/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package gradius.Elementos;

/**
 *
 * @author Eduardo
 */
public final class Coordenada {

    private int coordX;
    private int coordY;
    
    public Coordenada(int coordX, int coordY)
    {
        this.coordX=coordX;
        this.coordY=coordY;
    }

    public int getCoordX()
    {
        int i = this.coordX;
        return i;
    }

    public int getCoordY()
    {
        int i = this.coordY;
        return i;
    }

    public void setCoordX(int coordX)
    {
        this.coordX = coordX;
    }

    public void setCoordY(int coordY)
    {
        this.coordY = coordY;
    }

    public void incrementaCoordenada (int incX, int incY)
    {
        this.coordX += incX;
        this.coordY += incY;
    }

    @Override
    public String toString()
    {
        return ("Coordenada: (" + this.coordX + "," + this.coordY + ")");
    }

    @Override
    public Object clone()
    {
        Coordenada clone = new Coordenada(0,0);
        clone.setCoordX(this.coordX);
        clone.setCoordY(this.coordY);
        return clone;
    }
}
